package com.nbsaas.boot.marketing.rest.convert;

import com.nbsaas.boot.marketing.data.entity.FlashSaleProduct;
import com.nbsaas.boot.marketing.api.domain.request.FlashSaleProductRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 秒杀商品请求对象转换成实体对象
*/

public class FlashSaleProductEntityConvert  implements Converter<FlashSaleProduct, FlashSaleProductRequest> {

    @Override
    public FlashSaleProduct convert(FlashSaleProductRequest source) {
        FlashSaleProduct result = new FlashSaleProduct();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

